An image capture device capable of capturing a digital image such as a digital camera, a cellular phone, and the like includes an image sensor. The image sensor includes a 2-dimensional array sensor. Each sensor is located at ‘pixel position’. Each sensor detects intensity of one color of light. In general, there may be a green sensor, a red sensor and a blue sensor.
Various kinds of pixel array types adopted by CCD or CMOS image sensors exist. Yet, due to the facilitation of pixel design, excellent color reproducibility and process yield, most of the image sensors adopt the Bayer pattern shown in FIG. 1. According to a method of visualizing colors and images, red and blue may be sub-sampled for sampling of green by an image sensor. An uppermost row of a sensor includes alternating green and red pixels. A row next to the uppermost row includes green and blue pixels. The order of the sensors is generated row by row vertically below in an image sensor.
The, the number of green pixels G is greater than that of red or blue pixels R or B. The number of the green pixels G is equal to a sum of the numbers of red and blue pixels R and B. Thus, the number of the green pixels G is relatively greater than that of the red or blue pixels R or B. This is because a green color is closest to a luminance component and because a human eye reacts to the green color most sensitively.
Therefore, the image sensor shown in FIG. 1 has more green sensors than red or blue sensors. This can be called ‘red and blue sub-sampling’. One color sample value is taken from each pixel position on an image sensor only. For instance, each color sample value may have an 8-bit value for example.
Generally, an image has one pixel constructed with red, green and blue. Yet, referring to FIG. 1, the Bayer pattern has one pixel constructed with one color such as red, green and blue. In order to reconstruct a full image, color information missed from each pixel should be interpolated using neighbor pixels.
Many efforts are ongoing to be made to interpolate the missed color information accurately. Yet, if incorrect neighbor pixel information in a high-frequency area of an image is used, an artificial video of an image is displayed.
To solve this problem, there are studied techniques described in Color Demosaicing Using Variance Of Color Correlation, Effective Color Interpolation in CCD Color Filter Arrays Using Signal Correlation, etc. Regarding these techniques, edge sensing reduces incorrect pixel information but enables more precise pixel information to be acquired. Therefore, interpolation (demosaicing) is performed by acquiring precise pixel information through edge sensing.
A Hamilton edge classifier may be used for the edge sensing, which is represented as Formula 1. An image sensor includes a 2-dimensional array of color sensors for rows and columns. Each of the color sensors is located at one pixel position and then detects one color. In this example, each of the color sensors generates an 8-bit color subpixel value.
The indication ‘Gij’ is used to indicate a color subpixel value. A front capital letter indicates a detected color. If this letter is ‘R’, a detected color is red. If this letter is ‘G’, a detected color is green. If this letter is ‘B’, a detected color is blue. A notation by two numerals ‘ij’ follows the front letter. In this notation, a first numeral ‘i’ indicates a row of a subpixel value and a second numeral T indicates a column off the subpixel value.ΔHi,j=|Gi,j−1−Gi,j+1|+|2Ri,j−Ri,j−2−Ri,j+2|ΔVi,j=|Gi,j−1−Gi,j+1|+|2Ri,j−Ri−2,j−Ri+2,j|  [Formula 1]
In Formula 1, if a current position of a pixel for finding missed color information from an image is (i, j), a missed green value can be found according to Formula 2 by finding horizontal and vertical gradients and then determining whether an edge component in a horizontal direction or an edge component in a vertical direction is dominant.
                                          g                          i              ,              j                                =                                                                      G                                      i                    ,                                          j                      -                      1                                                                      +                                  G                                      i                    ,                                          j                      +                      1                                                                                  2                        +                                          (                                                      2                    ⁢                                                                                  ⁢                                          R                                              i                        ,                        j                                                                              -                                      R                                          i                      ,                                              j                        -                        2                                                                              -                                      R                                          i                      ,                                              j                        +                        2                                                                                            )                            4                                      ⁢                                  ⁢                              if            ⁢                                                  ⁢            Δ            ⁢                                                  ⁢                          H                              i                ,                j                                              <                      Δ            ⁢                                                  ⁢                          V                              i                ,                j                                                    ⁢                                  ⁢                              g                          i              ,              j                                =                                                                      G                                                            i                      -                      1                                        ,                    j                                                  +                                  G                                                            i                      +                      1                                        ,                    j                                                              2                        +                                          (                                                      2                    ⁢                                                                                  ⁢                                          R                                              i                        ,                        j                                                                              -                                      R                                                                  i                        -                        2                                            ,                      j                                                        -                                      R                                                                  i                        +                        2                                            ,                      j                                                                      )                            4                                      ⁢                                  ⁢                              if            ⁢                                                  ⁢            Δ            ⁢                                                  ⁢                          H                              i                ,                j                                              >                      Δ            ⁢                                                  ⁢                          V                              i                ,                j                                                    ⁢                                  ⁢                              g                          i              ,              j                                =                                                                                                                                        G                                                                              i                            -                            1                                                    ,                          j                                                                    +                                              G                                                                              i                            +                            1                                                    ,                          j                                                                    +                                                                                                                                                          G                                                  i                          ,                                                      j                            -                            1                                                                                              +                                              G                                                  i                          ,                                                      j                            +                            1                                                                                                                                                          4                        +                                                                                                                                                                                    (                                                                                          4                                ⁢                                                                                                                                  ⁢                                                                  R                                                                      i                                    ,                                    j                                                                                                                              -                                                                                                                                                                                                                                      R                                                                                                i                                  -                                  2                                                                ,                                j                                                                                      -                                                          R                                                                                                i                                  +                                  2                                                                ,                                j                                                                                      +                                                                                                                                                                                                                                                            R                                                      i                            ,                                                          j                              -                              2                                                                                                      -                                                  R                                                      i                            ,                                                          j                              +                              2                                                                                                                          )                                                                                  4                                      ⁢                                  ⁢                              if            ⁢                                                  ⁢            Δ            ⁢                                                  ⁢                          H                              i                ,                j                                              =                      Δ            ⁢                                                  ⁢                          V                              i                ,                j                                                                        [                  Formula          ⁢                                          ⁢          2                ]            
Even if Formula 1 and Formula 2 are used, if a successive 1-line narrow edge exists, Formula 1 is insufficient to perfectly discriminate accurate directionality of an edge. Hence, error of demosaicing occurs.
For this, an edge-sensing scheme in a 9×9 kernel using color correlation is introduced in Color Demosaicing Using Variance Of Color Correlation. Although ‘Effective Color Interpolation in CCD Color Filter Arrays Using Signal Correlation’ introduces a scheme of supplementing the above-described Hamilton edge-classifier, if a successive 1-line narrow edge exists, there still exists an incorrect edge sensing.